import binaryTreeSearch.BinaryTreeSearchReview;
import demo1.HashBucket;

import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;

public class Test {
    public static void main4(String[] args) {
        Set<Integer> set = new HashSet<>();
        System.out.println(set.add(1));// 1
        System.out.println(set.add(12));// 2
        System.out.println(set.add(1));// 3
        System.out.println(set);// 4
        System.out.println(set.remove(12));// 5
        System.out.println(set.remove(12));// 6
    }
    public static void main(String[] args) {
        Map<String, Integer> map = new HashMap<>();
        System.out.println(map.put("1", 1));
        System.out.println(map.put("1", 11));
        System.out.println(map.put("2", 1));
        System.out.println(map);
    }

    public static void main2(String[] args) {
        HashBucket hashBucket = new HashBucket();
        hashBucket.put(1,11);
        hashBucket.put(11,111);
        hashBucket.put(111,1111);
        hashBucket.put(2,2);
        hashBucket.put(12,22);
        hashBucket.put(4,44);
        hashBucket.put(5,55);
        hashBucket.put(6,66);
        System.out.println(hashBucket.get(1));
        System.out.println(hashBucket.get(123));
        System.out.println(hashBucket.get(111));
        System.out.println(hashBucket.get(6));
    }

    public static void main1(String[] args) {
        BinaryTreeSearchReview binaryTreeSearch = new BinaryTreeSearchReview();
        int[] arr = {5,12,3,2,11,15};
        for (int i = 0; i < arr.length; i++) {
            binaryTreeSearch.add(arr[i]);
        }
        binaryTreeSearch.remove(2);
        binaryTreeSearch.remove(12);
        binaryTreeSearch.remove(5);
        System.out.println(binaryTreeSearch.find(14));
        System.out.println(binaryTreeSearch.find(11));


    }


}
